import { defineStore } from 'pinia';
interface QuestChoseModelState {
  /** 是否展示 */
  isShown: boolean;

  /** 标题 */
  title: string;
}
export const useQuestChoseModelStore = defineStore({
  id: 'QuestChoseModelStore',
  state: (): QuestChoseModelState => ({
    isShown: false,
    title: '',
  }),
  getters: {
    /** 获取展示状态 */
    getShown(): QuestChoseModelState['isShown'] {
      return this.isShown;
    },

    /** 获取标题 */
    getTitle(): QuestChoseModelState['title'] {
      return this.title;
    },
  },
  actions: {
    /** 更改展示状态 */
    setShown(value: QuestChoseModelState['isShown']) {
      this.isShown = value;
    },

    /**
     * 设置标题
     * @param value
     */
    setTitle(value: QuestChoseModelState['title']) {
      this.title = value;
    },
  },
});
